from django.db import models


# 考试试题表
class ExamContent(models.Model):
    """
    examID = 试卷编号
    contentId = 题目编号
    examContent = 题目内容
    optionA = A选项
    optionB = B选项
    optionC = C选项
    optionD = D选项
    examAnswer = 正确答案
    """
    examName = models.CharField(max_length=255)
    examContent = models.CharField(max_length=255)
    optionA = models.CharField(max_length=255)
    optionB = models.CharField(max_length=255)
    optionC = models.CharField(max_length=255)
    optionD = models.CharField(max_length=255)
    examAnswer = models.CharField(max_length=255)


# 考试历史表
class ExamHistory(models.Model):
    """
    userId = 用户Id
    examID = 试卷编号
    contentId = 题目编号
    examContent = 题目内容
    userChosen = 答题选择
    examAnswer = 正确答案
    """
    userId = models.CharField(max_length=255)
    examName = models.CharField(max_length=255)
    examContent = models.CharField(max_length=255)
    userChosen = models.CharField(max_length=255)
    examAnswer = models.CharField(max_length=255)
    addTime = models.DateTimeField()


# 考试得分表
class ExamScore(models.Model):
    """
    userId = 用户Id
    examID = 试卷编号
    examScore = 考试成绩
    """
    userId = models.CharField(max_length=255)
    examName = models.CharField(max_length=255)
    examScore = models.FloatField()
    addTime = models.DateTimeField()
